package com.office.workflow.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.office.common.annotation.Excel;
import com.office.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 工作流节点对象 workflow_node
 * 
 * @author 数字牧马人
 */
public class WorkflowNode extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 节点ID */
    private Long id;

    /** 工作流ID */
    private Long workflowId;

    /** 节点唯一标识 */
    @Excel(name = "节点标识")
    private String nodeId;

    /** 节点名称 */
    @Excel(name = "节点名称")
    private String name;

    /** 节点类型 */
    @Excel(name = "节点类型")
    private String type;

    /** 节点描述 */
    @Excel(name = "节点描述")
    private String desc;

    /** 节点配置(JSON格式) */
    private String config;

    /** X坐标 */
    private Integer x;

    /** Y坐标 */
    private Integer y;

    /** 是否异步执行 */
    @Excel(name = "异步执行", readConverterExp = "0=否,1=是")
    private Boolean async;

    /** 是否循环执行 */
    @Excel(name = "循环执行", readConverterExp = "0=否,1=是")
    private Boolean loop;

    /** 排序 */
    private Integer sortOrder;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setWorkflowId(Long workflowId) 
    {
        this.workflowId = workflowId;
    }

    public Long getWorkflowId() 
    {
        return workflowId;
    }

    public void setNodeId(String nodeId) 
    {
        this.nodeId = nodeId;
    }

    public String getNodeId() 
    {
        return nodeId;
    }

    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }

    public void setType(String type) 
    {
        this.type = type;
    }

    public String getType() 
    {
        return type;
    }

    public void setDesc(String desc) 
    {
        this.desc = desc;
    }

    public String getDesc() 
    {
        return desc;
    }

    public void setConfig(String config) 
    {
        this.config = config;
    }

    public String getConfig() 
    {
        return config;
    }

    public void setX(Integer x) 
    {
        this.x = x;
    }

    public Integer getX() 
    {
        return x;
    }

    public void setY(Integer y) 
    {
        this.y = y;
    }

    public Integer getY() 
    {
        return y;
    }

    public void setAsync(Boolean async) 
    {
        this.async = async;
    }

    public Boolean getAsync() 
    {
        return async;
    }

    public void setLoop(Boolean loop) 
    {
        this.loop = loop;
    }

    public Boolean getLoop() 
    {
        return loop;
    }

    public void setSortOrder(Integer sortOrder) 
    {
        this.sortOrder = sortOrder;
    }

    public Integer getSortOrder() 
    {
        return sortOrder;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("workflowId", getWorkflowId())
            .append("nodeId", getNodeId())
            .append("name", getName())
            .append("type", getType())
            .append("desc", getDesc())
            .append("config", getConfig())
            .append("x", getX())
            .append("y", getY())
            .append("async", getAsync())
            .append("loop", getLoop())
            .append("sortOrder", getSortOrder())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
} 